<?php
$this->breadcrumbs=array(
	$this->logModelClass=>array('admin'),
	'Manage',
);

$this->pageHeader = 'Logs for <em>'.$this->logModelClass.'</em>';
?>

<?php $this->widget('bootstrap.widgets.BootGridView', array(
	'type'=>'striped',
	'id'=>'http-conn-log-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'htmlOptions'=>array('style'=>'font-family:monospace;'),
	'columns'=>array(
		array(
			'name'=>'request_method',
			'type'=>'raw',
			'value'=>'CHtml::link($data->request_method, array("view", "id"=>$data->id))',
			'htmlOptions'=>array(
				'style'=>'width:50px;',
			),
		),
		array(
			'name'=>'request_url',
			'type'=>'raw',
			'value'=>'CHtml::link(substr($data->request_url, 0, strrpos($data->request_url, "/")+1), array("view", "id"=>$data->id))',
		),
		array(
			'name'=>'response_code',
			'header'=>'rCode',
			'type'=>'raw',
			'value'=>'"<code>".$data->response_code."</code>"',
			'htmlOptions'=>array(
				'style'=>'width:5em;text-align:right;',
			),
		),		
		array(
			'name'=>'post_data',
			'header'=>'Post Data',
			'type'=>'raw',
			'value'=>'$data->postData'
		),
		array(
			'name'=>'src_ip',
			'htmlOptions'=>array(
				'style'=>'width:8em;text-align:right;',
			),
		),
		array(
			'name'=>'dst_ip',
			'htmlOptions'=>array(
				'style'=>'width:8em;text-align:right;',
			),
		),
		array(
			'name'=>'request_time',
			'value'=>'Yii::app()->dateFormatter->formatDateTime($data->request_time, "medium", "medium")',
			'htmlOptions'=>array(
				'style'=>'width:12em;text-align:right;',
			),
		),
		array(
			'name'=>'duration',
			'type'=>'raw',
			'value'=>'sprintf("%d ms", $data->duration*1000)',
			'htmlOptions'=>array(
				'style'=>'width:70px;text-align: right;font-family: Consolas',
			),
		),
	),
)); ?>